﻿<!DOCTYPE html>
<!-- 
| - - Motion.Euzo.Ca - - - Motion and M+ from euzo.ca - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
-->
<html>
<head>
    <title>Font Preview</title>
    <!-- 
    Application and page settings.
    -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- 
    Style sheets. 
    -->
    <link href="../../Fonts/Fonts.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .FontSizeLabel
        {
            font-size: 10px;
            color: rgb(102, 102, 102);
            display: block;
            font-family: arial, sans-serif;
            font-weight: normal;
            float: left;
            margin-right: 0.5em;
        }
        .FontPreview
        {
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0.3em;
            margin-left: 0px;
            color: rgb(0, 0, 0);
            white-space: nowrap;
        }
    </style>
    <!--  
    Application scripts.    
    -->
    <script src="../../Fonts/Fonts.js" type="text/ecmascript">
    </script>
    <script type="text/ecmascript" language="ecmascript">

        function FontNameChanged()
        {
            FontWeight100.style.display = 'none'
            FontWeightLabel100.style.display = 'none'
            FontWeight200.style.display = 'none'
            FontWeightLabel200.style.display = 'none'
            FontWeight300.style.display = 'none'
            FontWeightLabel300.style.display = 'none'
            FontWeight500.style.display = 'none'
            FontWeightLabel500.style.display = 'none'
            FontWeight700.style.display = 'none'
            FontWeightLabel700.style.display = 'none'
            FontWeight800.style.display = 'none'
            FontWeightLabel800.style.display = 'none'
            FontWeight900.style.display = 'none'
            FontWeightLabel900.style.display = 'none'

            TestPanel.style.fontFamily = "'" + SelectFont.value + "'"
            var additionalWeight = Motion.Fonts.AdditionalWeight[SelectFont.value]
            if (additionalWeight)
            {
                for (var additionalWeightItem in additionalWeight)
                {
                    eval("FontWeight" + additionalWeightItem + ".style.display = ''")
                    eval("FontWeightLabel" + additionalWeightItem + ".style.display = ''")
                }
            }

            FontWeight400.checked = true;
            FontWeightChanged()
        }

        function FontWeightChanged()
        {
            if (FontWeight100.checked)
            {
                TestPanel.style.fontWeight = FontWeight100.value
            }
            else if (FontWeight200.checked)
            {
                TestPanel.style.fontWeight = FontWeight200.value
            }
            else if (FontWeight300.checked)
            {
                TestPanel.style.fontWeight = FontWeight300.value
            }
            else if (FontWeight400.checked)
            {
                TestPanel.style.fontWeight = FontWeight400.value
            }
            else if (FontWeight500.checked)
            {
                TestPanel.style.fontWeight = FontWeight500.value
            }
            else if (FontWeight600.checked)
            {
                TestPanel.style.fontWeight = FontWeight600.value
            }
            else if (FontWeight700.checked)
            {
                TestPanel.style.fontWeight = FontWeight700.value
            }
            else if (FontWeight800.checked)
            {
                TestPanel.style.fontWeight = FontWeight800.value
            }
            else if (FontWeight900.checked)
            {
                TestPanel.style.fontWeight = FontWeight900.value
            }

            if (SelectItalic.checked == true)
            {
                TestPanel.style.fontStyle = 'italic'
            }
            else
            {
                TestPanel.style.fontStyle = ''
            }
        }

        function PageLoaded()
        {
            FontNameChanged();
            for (var FontNameIndex in Motion.Fonts.List)
            {
                var FontName = Motion.Fonts.List[FontNameIndex]
                var FontItem = document.createElement('option')
                FontItem.text = FontName
                FontItem.value = FontName
                SelectFont.add(FontItem);
            }
        }
    </script>
</head>
<body onload="PageLoaded()">
    <select id="SelectFont" onchange="FontNameChanged()">
        <option></option>
    </select>&nbsp;&nbsp;&nbsp;
    <input type="checkbox" id="SelectItalic" onchange="FontWeightChanged()" />Italic
    &nbsp;|&nbsp;
    Weight:
    <input type="radio" onchange="FontWeightChanged()" name="FontWeight" value="200"
        id="FontWeight100" /><span id="FontWeightLabel100">100&nbsp;</span><input type="radio"
            onchange="FontWeightChanged()" name="FontWeight" value="200" id="FontWeight200" />
    <span id="FontWeightLabel200">200&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="300" id="FontWeight300" />
    <span id="FontWeightLabel300">300&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="400" id="FontWeight400" />
    <span id="FontWeightLabel400">400 (Normal)&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="500" id="FontWeight500" />
    <span id="FontWeightLabel500">500&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="600" id="FontWeight600" />
    <span id="FontWeightLabel600">600 (Bold)&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="700" id="FontWeight700" />
    <span id="FontWeightLabel700">700&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="800" id="FontWeight800" />
    <span id="FontWeightLabel800">800&nbsp;</span><input type="radio" onchange="FontWeightChanged()"
        name="FontWeight" value="900" id="FontWeight900" />
    <span id="FontWeightLabel900">900&nbsp;</span>
    <br />
    <hr />
    <br />
    <div id="TestPanel">
        <div class="FontPreview" style="font-size: 36px;">
            <span class="FontSizeLabel">36px</span>The quick brown fox jumps over the lazy dog</div>
        <div class="FontPreview" style="font-size: 30px;">
            <span class="FontSizeLabel">30px</span>The quick brown fox jumps over the lazy dog</div>
        <div class="FontPreview" style="font-size: 24px;">
            <span class="FontSizeLabel">24px</span>The quick brown fox jumps over the lazy dog</div>
        <div class="FontPreview" style="font-size: 21px;">
            <span class="FontSizeLabel">21px</span>The quick brown fox jumps over the lazy dog</div>
        <div class="FontPreview" style="font-size: 18px;">
            <span class="FontSizeLabel">18px</span>The quick brown fox jumps over the lazy dog</div>
        <div class="FontPreview" style="font-size: 16px;">
            <span class="FontSizeLabel">16px</span>The quick brown fox jumps over the lazy dog</div>
        <p style="font-size: 14px;">
            <span class="FontSizeLabel">14px</span>Lorem ipsum dolor sit amet, consectetur adipisicing
            elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
            ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
            commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
            sunt in culpa qui officia deserunt mollit anim id est laborum. 0123456789</p>
        <p style="font-size: 12px;">
            <span class="FontSizeLabel">12px</span>Lorem ipsum dolor sit amet, consectetur adipisicing
            elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
            ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
            commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
            sunt in culpa qui officia deserunt mollit anim id est laborum. 0123456789</p>
        <p style="font-size: 12px; color: rgb(51, 51, 51);">
            <span class="FontSizeLabel">12px</span>Lorem ipsum dolor sit amet, consectetur adipisicing
            elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
            ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
            commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
            sunt in culpa qui officia deserunt mollit anim id est laborum. 0123456789</p>
        <p style="font-size: 12px; color: rgb(102, 102, 102);">
            <span class="FontSizeLabel">12px</span>Lorem ipsum dolor sit amet, consectetur adipisicing
            elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
            ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
            commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
            sunt in culpa qui officia deserunt mollit anim id est laborum. 0123456789</p>
    </div>
</body>
</html>
